<div *ngIf="isModalShown" [config]="{ show: true }" (onHidden)="onHidden()"
     bsModal #bookingModal="bs-modal" class="modal fade login-modal-view wf-login-modal" tabindex="-1" role="dialog"
     aria-hidden="true">

  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
        <div class="repair-container">
          <div class="repair-title">
            <app-title [titleCpt]="repairTitleCpt[0]"></app-title>
          </div>
          <div class="sayhi">
            <span class="font_18">{{hello}}{{user.name}}</span>
          </div>
          <form class="form-horizontal" [formGroup]="repairForm">
            <div class="form-group">
              <label>房&nbsp;&nbsp;间&nbsp;&nbsp;号</label>
              <div class="select-box">
                <select name="houseNo" formControlName="houseNo">
                  <option *ngFor="let item of houseList" [value]="item.houseId">{{item.houseNo}}</option>
                </select>
              </div>
            </div>
            <div class="form-group">
              <label>报修内容</label>
              <input type="text" placeholder="请输入报修内容(*必填)" name="content" formControlName="content">
            </div>
            <div class="form-group textarea-wrap">
              <label>报修描述</label>
              <textarea placeholder="说一说具体的求助信息，清楚明确的描述容易获得帮助" name="detail" formControlName="detail"></textarea>
            </div>
            <div class="form-group upload-box">

              <label >上传图片</label>
              <div class="file-box">
                <img *ngIf="reqData.image.length>0" [src]="reqData.image[0]" alt="" style="width: 100%;">
                <form id="fileinfo" enctype="multipart/form-data" *ngIf="reqData.image==0" >
                  <input type="file" name="file"
                         accept="image/jpeg,image/png" (change)="handleFile()" id="fileList">
                </form>
                <span class="txt"><i class="wficon-add font_24"></i><br>若无法用语言描述清楚，点击此处上传图片</span>
              </div>
            </div>
          </form>
          <div class="btn-group">
            <button class="login-btn form-control bg-green"
                    (click)="doRepair()"
                    [disabled]="!repairForm.controls.houseNo.value||!repairForm.controls.content.value">确认</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
